# Document Update Content Type
Updates the content type of documents in a document library by processing rows from an Excel file.
Filename pattern: filename must contain DocumentUpdateContentType but NOT DocumentUpdateContentTypeEmail (case-insensitive).
Example: 20240115 DocumentUpdateContentType migrate.xlsx
# Columns
| Name | Required | Description |
|---|---|---|
| DoclibUrl / Url | Conditional | Server-relative URL of the document library. Required when MatterCode is not provided. |
| MatterCode | Conditional | Matter code used to resolve document libraries from the matter list. Required when Url is not provided. Processes all document libraries for the matter. |
| ClientCode | No | Client code used together with MatterCode to identify the matter. |
| ContentType / OldContentType | No | Current content type display name. When provided, only files matching this content type are updated. When omitted, all files in the library are updated. |
| NewContentType | Yes | Display name of the content type to assign to the files. The content type must already exist on the library. |
Either Url or MatterCode must be provided. NewContentType is always required.
# Behavior
The handler first ensures the NewContentType is present on the library (adding it if necessary), then finds all matching files and updates their ContentTypeId field using UpdateSystem (preserving modified date and modified by).
# Related links
- Document Update Content Type Email handler — specialized variant for email files
- Doclib Content Types handler — add or remove content types from a library
- Content Type Set handler — create or update content type definitions